<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Game home</title>
</head>
<body>
<div align="center">
            <h1>Contact List</h1>
            <h3><a href="newGame">New Game</a></h3>
            <table border="1">
                <th>No</th>
                <th>title</th>
                <th>createDate</th>
                <th>edit</th>
                <c:forEach var="game" items="${listGame}" varStatus="status">
                <tr>
                    <td>${status.index + 1}</td>
                    <td>${game.title}</td>
                    <td>${game.createDate}</td>
                    <td>
                        <a href="editGame?id=${game.id}">Edit</a>
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <a href="deleteGame?id=${game.id}">Delete</a>
                    </td>
                </tr>
                </c:forEach>             
            </table>
        </div>
</body>
</html>